# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=btyacc
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.0
pkgrel=1
pkgdesc="BackTracking Yacc (mingw-w64)"
arch=('any')
url="https://www.siber.com/btyacc/"
license=("custom")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
options=('strip' 'staticlibs')
source=(https://www.siber.com/btyacc/${_realname}-${pkgver//./-}.tar.gz)
sha256sums=('501be7eb21623b4bbf47f6c33f74b6dab52374939c0f155b364b1efa641b020a')

build() {
  cd ${srcdir}
  make all
}

package() {
  cd "${srcdir}"
  mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,share}
  cp btyacc.exe ${pkgdir}${MINGW_PREFIX}/bin/

  mkdir -p ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}
  cp README{,.BYACC} ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/
}
